import http  from "@/http/index"


export default{


    add:{
        name:"添加商品",
        url:"/api/product/add",
        call: async function (params:any ={}) {
            return await http.post(this.url,params)
            
        }
    },
    selectById: {
        name: "根据id查询商品信息",
        url: "/api/product/get",
        call: async function (params: any = {}) {
            return await http.get(this.url, params)
        }
    },
    selectPage: {
        name: "商品列表",
        url: "/api/product/list",
        call: async function (params: any = {}) {
            return await http.get(this.url, params)
        }
    },
    delete: {
        name: "删除商品",
        url: "/api/product/del",
        call: async function (params: any = {}) {
            return await http.delete(this.url, params)
        }
    },
    update: {
        name: "更新商品",
        url: "/api/product/update",
        call: async function (params: any = {}) {
            return await http.put(this.url, params)
        }
    },
}
